A process of writing to a nonvolatile memory such as a flash memory is executed by reversing a first logical value of any of memory cells in a state (deletion state) in which the memory cells hold the first logical value to a second logical value based on write data. For example, in a flash memory, a writing process is executed by reversing a logical value “1” of any of memory cells in the deletion state in which the memory cells hold the logical value “1” to a logical value “0” based on write data.
It takes time to write the logical value “0” to a flash memory, since a floating gate of a memory cell of the flash memory is gradually charged with electrons in the writing of the logical value “0”. Thus, there is a conventional technique for reversing all bits of write data and writing the data to memory cells in the case where a large number of bits having the logical value “0” are included in the write data.
In the conventional technique for reversing all bits of write data, however, the ratio of the number of bits having the logical value “0” and included in the write data to be written to a flash memory to the number of all bits of the write data is not lower than 50% in the worst case, and it may take long time to write the data. In not only the flash memory but also another type of nonvolatile memory, as the number of bits to be reversed from logical values in the deletion state is larger, a writing time period is longer.
The following is a reference document.
[Document 1] Japanese Laid-open Patent Publication No. 2005-157781.